{% load i18n %}
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
		Remove this if you use the .htaccess -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>home</title>
		<meta name="description" content="" />
		<meta name="author" content="jvirkovskiy" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		
		<!--script type="text/javascript">
			function sel_lang_clickHandler() {
				var fm = document.getElementById('sel_lang_form');
				var sel = document.getElementById('lang_selector');
				fm.action="i18n/" + sel.value;
				fm.submit();
			}
		</script-->
	</head>
	<body>
		<div>
			<header>
				<h1>home</h1>
				<ul>
					{% for lang in LANGUAGES %}
					<li>
						<form action={{ "i18n/"|add:lang.0 }} method="post">
							{% csrf_token %}
							<input type="submit" value="{{ lang.1 }}"/>
						</form>
					</li>
					{% endfor %}
				</ul>
			</header>
			<nav>
				<p>
					<a href="/">Home</a>
				</p>
				{% if user.is_authenticated %}
				<p>
					<a href="auth/logout">{{user.username}}</a>
				</p>
				<p>
					<a href="lab">Lab</a>
				</p>
				{% else %}
				<form action="auth/login" method="post">
					{% csrf_token %}
					<ul>
						<li>
							<label for="id_username">{% trans "login:" %}</label>
							<input id="id_username" type="text" name="username" maxlength="30"/>
						</li>
						<li>
							<label for="id_password">{%trans "password:" %}</label>
							<input id="id_password" type="password" name="password" maxlength="128"/>
						</li>
						<li>
							<input type="submit" value="{% trans "login" %}"/>
						</li>
					</ul>
				</form>
				{% endif %}
			</nav>
			<div></div>
			<footer>
				<p>
					&copy; Copyright  by jvirkovskiy
				</p>
			</footer>
		</div>
	</body>
</html>
